<template>
  <div class="swiperSlideOverflowSubject">
    <div class="swiperSlideOverflowMain">
      <div v-for="(item, index) in comicList" :key="index">
        <div class="img">
          <img :src="item.imgPath" @click="toComicInfo(item.id)" />
        </div>
        <font class="title" @click="toComicInfo(item.id)">{{
          item.title
        }}</font>
        <font class="chapter">{{ item.chapter }}</font>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  name: 'SwiperSlideOverflowCom',
  props: {
    comicList: {
      type: Array
    }
  },
  methods: {
    toComicInfo (value) {
      this.$router.push({
        path: '/comicInfo',
        query: {
          id: value
        }

      });
    }
  }
};
</script>

<style lang="less" scoped>
.swiperSlideOverflowSubject {
  width: 100%;
  height: 100%;

  overflow: auto;
}
.swiperSlideOverflowSubject .swiperSlideOverflowMain {
  width: 1055px;
  height: 100%;
  display: flex;
  justify-content: space-between;
  div {
    width: 116px;
    height: 100%;

    float: left;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    .img {
      width: 100%;
      height: 140px;
      display: flex;
      justify-content: center;

      img {
        width: 105px;
      }
    }

    .title {
      font-size: 15px;
      font-weight: bold;
      color: black;
      display: block;
      width: 105px;
      text-overflow: ellipsis;
      overflow: hidden;
      white-space: nowrap;
    }
    .chapter {
      font-size: 12px;
      font-weight: bold;
      color: #a7a7a7;
      display: block;
      width: 105px;
      text-overflow: ellipsis;
      overflow: hidden;
      white-space: nowrap;
    }
  }
}
</style>>
